const {getCoreConnection, query} = require('../mysql/mysql');
const {logger} = require('../log4j');

/**
 * 查询用户登录名,所有的
 * @returns {Promise<void>}
 */
async function queryAccountUserNames() {
    try {

        const connection = await getCoreConnection();
        const {rows} = await query(connection, 'select id,username from account ');
        connection.release();
        return rows;
    } catch (err) {
        logger.error(err);
    }
}

module.exports.queryAccountUserNames = queryAccountUserNames;